package com.stock_t.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.stock_t.annotation.QueryCondition;
import lombok.Data;
import java.math.BigDecimal;
import java.util.Date;

@Data
public class StockTrading {
    /**
     * 主键ID
     */
    @TableId(type = IdType.AUTO)
    private Long id;

    /**
     * 交易日期
     */
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    private Date tradeDate;

    /**
     * 星期几
     */
    private String tradeDay;

    /**
     * 股票编号
     */
    private String stockCode;

    /**
     * 股票名称
     */
//    @QueryCondition(value = QueryCondition.Type.LIKE, columnName = "stock_name")
    private String stockName;

    /**
     * 总股数
     */
    private BigDecimal totalShares;

    /**
     * 股票市值
     */
    private BigDecimal marketValue;

    /**
     * 盈亏
     */
    private BigDecimal profitLoss;

    /**
     * 保本价
     */
    private BigDecimal breakEvenPrice;

    /**
     * 当日股价
     */
    private BigDecimal currentPrice;

    /**
     * 做T收益
     */
    @TableField(value="t_profit")
    private BigDecimal tprofit;

    /**
     * 创建时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    private Date createdTime;

    /**
     * 更新时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    private Date updatedTime;
}